package main;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;

public class Ordenar {
	private static Connection conexion;
	private static ArrayList<Integer> listaPartidas;

	/**
	 * @param args
	 * @throws ClassNotFoundException 
	 * @throws SQLException 
	 */
	public static void main(String[] args) throws ClassNotFoundException, SQLException {
		// TODO Auto-generated method stub
		Statement st;

		Class.forName("com.mysql.jdbc.Driver");
		conexion = DriverManager.getConnection("jdbc:mysql://localhost/proyecto", "root", "gracias");
		st = conexion.createStatement(); 
		listaPartidas = new ArrayList<Integer>();

		int id = 2570582; int num = 60; int cont = 80; int n;
		for(int i = num; i <= cont; i++) {
			n = i - 1;
			st.executeUpdate("UPDATE gameplaymatchuser SET numberMatch = '"+n+"' WHERE numberMatch = '"+i+"' AND idPlayer = '"+id+"'");
		}
	}

}
